<%-- 
    Document   : stock_content
    Created on : Oct 30, 2010, 2:17:50 PM
    Author     : M Bilal
--%>


<%@page import="wap.rockvilletech.portal.DBProc"%>
<%@include file="../includes/header.jspf"%>

<%
thisPage="Finance-StockContent";
String stock_type=request.getParameter("stype")!=null?request.getParameter("stype").toString():"";
String stock_cat=request.getParameter("scat")!=null?request.getParameter("scat").toString():"";
app=" KSE "+stock_type;
Vector v_stock=null;
String[] stock_label=null,stock_data=null;
DBProc db = DBProc.getInstance();
if("Index".equals(stock_type)){
    v_stock = db.get_stock_index(stock_cat);
    stock_label=new String[]{"Current","Volume","Value", "High","Low","Change"};
}else if("Market".equals(stock_type)){
    v_stock = db.get_stock_market(stock_cat);
    stock_label=new String[]{"Flag"," Bid Volume"," Bid Price","Offer Price"," Offer Volume"," Last Rate"," Change"," Total Volume"};
}
%>
<div style="padding: 5px 0px 0px 0px;">

    <div class="div_navigation" id="div_navigation">
        <a href="/ufone/index.jsp?page=index.jsp&amp;ref=navLinks" class="LinkIndex">Home</a>&nbsp;&gt;
        <a href="<%=context_Path%>/finance/finance.jsp" class="LinkIndex">Finance</a>&nbsp;&gt;
        <%if ("Index".equals(stock_type)) {
        %>
        <a href="<%=context_Path%>/finance/ustock_index.jsp" class="LinkIndex">Index Ratings</a>&nbsp;&gt;
        <%

        } else if ("Market".equals(stock_type)) {
        %>
        <a href="<%=context_Path%>/finance/ustock_update.jsp" class="LinkIndex">KSE Updates</a>&nbsp;&gt;
        <%

        }
        %>
        <span class="navigation_Leaf"><%="Stock " + stock_type%></span>
    </div>

</div>

<div>
    <table width="100%" align="left" cellpadding="0" cellspacing="0" style="text-align: left;font-weight: bold;">
        <tr>
            <td style="background-image:url('../images/new/top_bar_02.jpg');background-repeat: repeat-x;height:26px;background-color:#D7D5D5;">
                <b style="padding:0px 0px 0px 3px;"><%=stock_cat.toUpperCase()%></b>
            </td>
        </tr>
    </table>
</div>

<div style="clear: both;"></div>
<div style="padding:3px;" align="left">
    <table cellpadding="0" cellspacing="0" width="100%" border="1px solid #D7D5D5">
    
    <%
    for(int i=0;i<v_stock.size();i++){
        stock_data=(String[])v_stock.get(i);
        for(int t=0;t<stock_data.length;t++){
     %>

     <tr align="center">
         <td><%=stock_label[t]%></td>
         <td><%=stock_data[t]%></td>
      </tr>

<%
    }
    }
%>
</table>


</div>
<div style="padding:0px 0px 0px 0px;text-decoration: underline;">
    <jsp:include page="../banner.jsp">
        <jsp:param name="w" value="<%=width%>"/>
    </jsp:include>
</div>

<%@include file="../includes/footer.jspf" %>



<%
wpb.LogVisit(strIP, thisPage, strGsm,strApn,strBrand,strModel, app,request.getQueryString());
%>